#include <iostream>
using namespace std;

int main()
{
	int arr1[10010] = {0};
	int arr2[10010] = {0};
	int n;
	cin >> n;
	for(int i = 0; i < n; i++)
		cin >> arr1[i];
	for(int i = 0; i < n; i++)
		cin >> arr2[i];
	
	int res = 0;
	
	for(int i = 0; i < n; i++)
		res += arr1[i] * arr2[i];
		
	cout << res << endl;
 	return 0;
 } 
